package shopping;
import java.util.ArrayList;

public class ShoppingCart implements Search{
    public ArrayList<Goods> car = new ArrayList<Goods>();

    public void add(Goods c)
    {
        this.car.add(c);
    }
    public void del(Goods c)
    {
        for(int i=0;i<this.car.size();i++)
        {
            if(car.get(i).equals(c))
            {
                car.remove(i);
                return;
            }
        }
    }
    @Override
    public String toString()
    {
        return this.car.toString();
    }
    public void search(){};
}